/*
 Navicat MySQL Data Transfer

 Source Server         : form_data_db
 Source Server Type    : MySQL
 Source Server Version : 50741
 Source Host           : localhost:3306
 Source Schema         : form_data_db

 Target Server Type    : MySQL
 Target Server Version : 50741
 File Encoding         : 65001

 Date: 04/04/2023 21:07:43
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for ac_user
-- ----------------------------
DROP TABLE IF EXISTS `ac_user`;
CREATE TABLE `ac_user` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(32) NOT NULL DEFAULT '' COMMENT '姓名',
  `avatar` varchar(256) NOT NULL DEFAULT '' COMMENT '头像',
  `gender` tinyint(1) NOT NULL DEFAULT '0' COMMENT '性别0未知 1男2女',
  `email` varchar(100) DEFAULT NULL COMMENT '邮箱',
  `phone_number` varchar(11) DEFAULT NULL COMMENT '手机号',
  `password` varchar(255) DEFAULT NULL COMMENT '密码',
  `reg_channel` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '注册渠道',
  `last_login_channel` tinyint(4) DEFAULT NULL COMMENT '最后登录渠道',
  `last_login_time` datetime DEFAULT NULL COMMENT '最后登录时间',
  `last_login_ip` varchar(50) DEFAULT NULL COMMENT '最后登录Ip',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '状态',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=203 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='用户';

-- ----------------------------
-- Records of ac_user
-- ----------------------------
BEGIN;
INSERT INTO `ac_user` VALUES (202, 'superAdmin', 'https://freebrio.oss-cn-shanghai.aliyuncs.com/t/avatar.jpg', 0, NULL, '13824320290', '4f6d2eeee42e65b82917315cf20353ee48a2cebe4a23946dbb37003e6f6055d1', '1', 3, '2023-04-04 17:51:08', '127.0.0.1', 0, '2020-11-12 11:50:50', '2023-04-04 17:51:08');
COMMIT;

-- ----------------------------
-- Table structure for ac_user_authorize
-- ----------------------------
DROP TABLE IF EXISTS `ac_user_authorize`;
CREATE TABLE `ac_user_authorize` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `type` tinyint(1) NOT NULL COMMENT '第三方平台类型',
  `app_id` varchar(150) NOT NULL COMMENT '平台AppId',
  `open_id` varchar(150) NOT NULL COMMENT '平台OpenId',
  `user_name` varchar(255) NOT NULL COMMENT '平台用户名',
  `user_id` bigint(20) DEFAULT NULL COMMENT '用户Id',
  `user_info` json DEFAULT NULL COMMENT '平台用户信息',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='第三方用户授权信息';

-- ----------------------------
-- Records of ac_user_authorize
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for fm_form_template
-- ----------------------------
DROP TABLE IF EXISTS `fm_form_template`;
CREATE TABLE `fm_form_template` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '模板Id',
  `key` varchar(50) NOT NULL COMMENT '模板唯一标识',
  `cover_img` varchar(100) DEFAULT NULL COMMENT '封面图',
  `name` varchar(100) NOT NULL COMMENT '模板I名称',
  `description` text COMMENT '模板I描述',
  `category_id` int(11) NOT NULL COMMENT '模板类型',
  `scheme` json DEFAULT NULL COMMENT '模板定义',
  `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `code` (`key`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='表单模板';

-- ----------------------------
-- Records of fm_form_template
-- ----------------------------
BEGIN;
INSERT INTO `fm_form_template` VALUES (1, 'da673c4576b74846b13d720c81445ea7', 'http://localhost:8999/profile//7252f2d28c684d99be1957a0b4c08fc2.png', 'testtest', NULL, 4, '{\"formItems\": [{\"id\": 37772, \"sort\": 1, \"span\": 24, \"type\": \"INPUT\", \"label\": \"姓名\", \"scheme\": {\"sort\": 1, \"style\": {\"width\": \"100%\"}, \"config\": {\"tag\": \"t-input\", \"span\": 24, \"label\": \"姓名\", \"append\": \"\", \"formId\": \"input-1679823045120\", \"prepend\": \"\", \"regList\": [], \"tagIcon\": \"input\", \"dataType\": {\"type\": \"\", \"message\": \"\"}, \"required\": true, \"changeTag\": true, \"renderKey\": 1679823058005, \"showLabel\": true}, \"typeId\": \"INPUT\", \"vModel\": \"input-1679823045120\", \"disabled\": false, \"readonly\": false, \"clearable\": true, \"placeholder\": \"请输入姓名\", \"prefix-icon\": \"\", \"suffix-icon\": \"\", \"show-word-limit\": false}, \"formKey\": \"da673c4576b74846b13d720c81445ea7\", \"regList\": [], \"required\": true, \"showLabel\": true, \"createTime\": \"2023-03-26 17:30:46\", \"formItemId\": \"input-1679823045120\", \"updateTime\": \"2023-03-26 17:30:58\", \"displayType\": false, \"placeholder\": \"请输入姓名\"}, {\"id\": 37776, \"sort\": 65537, \"span\": 24, \"type\": \"INPUT\", \"label\": \"手机号\", \"scheme\": {\"dId\": 37776, \"key\": \"input-1679823126170167982331457037776\", \"sort\": 65537, \"style\": {\"width\": \"100%\"}, \"config\": {\"tag\": \"t-input\", \"span\": 24, \"label\": \"手机号\", \"append\": \"\", \"formId\": \"input-1679823126170\", \"prepend\": \"\", \"regList\": [], \"tagIcon\": \"input\", \"dataType\": {\"type\": \"phone\", \"message\": \"请输入正确的手机号\"}, \"required\": true, \"changeTag\": true, \"renderKey\": 1679823324638, \"showLabel\": true}, \"typeId\": \"INPUT\", \"vModel\": \"input-1679823126170\", \"regList\": [], \"disabled\": false, \"readonly\": false, \"clearable\": true, \"formItemId\": \"input-1679823126170\", \"displayType\": false, \"placeholder\": \"请输入手机号\", \"prefix-icon\": \"\", \"suffix-icon\": \"\", \"show-word-limit\": false}, \"formKey\": \"da673c4576b74846b13d720c81445ea7\", \"regList\": [], \"required\": true, \"showLabel\": true, \"createTime\": \"2023-03-26 17:32:13\", \"formItemId\": \"input-1679823126170\", \"updateTime\": \"2023-03-26 17:35:25\", \"displayType\": false, \"placeholder\": \"请输入手机号\"}, {\"id\": 37774, \"sort\": 131073, \"span\": 24, \"type\": \"IMAGE_UPLOAD\", \"label\": \"图片上传\", \"scheme\": {\"name\": \"file\", \"limit\": 2, \"accept\": \"image/*\", \"action\": \"/tduck-api/form/file/upload/da673c4576b74846b13d720c81445ea7\", \"config\": {\"tag\": \"t-image-upload\", \"span\": 24, \"label\": \"图片上传\", \"formId\": \"image_upload-1679823074452\", \"regList\": [], \"showTip\": false, \"tagIcon\": \"image-upload\", \"fileSize\": 10, \"required\": true, \"sizeUnit\": \"MB\", \"changeTag\": true, \"renderKey\": \"image_upload-16798230744521679823074452\", \"showLabel\": true, \"buttonText\": \"点击上传\", \"showRegList\": false, \"defaultValue\": []}, \"typeId\": \"IMAGE_UPLOAD\", \"vModel\": \"image_upload-1679823074452\", \"disabled\": false, \"multiple\": false, \"auto-upload\": true}, \"formKey\": \"da673c4576b74846b13d720c81445ea7\", \"regList\": [], \"required\": true, \"showLabel\": true, \"createTime\": \"2023-03-26 17:31:15\", \"formItemId\": \"image_upload-1679823074452\", \"updateTime\": \"2023-03-26 17:31:15\", \"displayType\": false, \"defaultValue\": \"[]\"}, {\"id\": 37777, \"sort\": 196609, \"span\": 24, \"type\": \"IMAGE\", \"label\": \"图片展示\", \"scheme\": {\"alt\": \"\", \"fit\": \"contain\", \"src\": \"http://localhost:8999/profile//854d6fae5ee42911677c739ee1734486/e16c5fdc1756452892bccaf84ab490ef.png\", \"sort\": 196609, \"style\": {\"width\": \"100%\"}, \"config\": {\"tag\": \"el-image\", \"span\": 24, \"error\": \"image\", \"label\": \"图片展示\", \"formId\": \"image-1679823137768\", \"regList\": [], \"tagIcon\": \"image\", \"required\": false, \"changeTag\": true, \"renderKey\": \"image-16798231377681679823137768\", \"showLabel\": false, \"displayType\": true, \"showRegList\": false, \"showRequired\": false, \"showClearable\": false, \"showDefaultValue\": false}, \"typeId\": \"IMAGE\", \"vModel\": \"image-1679823137768\"}, \"formKey\": \"da673c4576b74846b13d720c81445ea7\", \"regList\": [], \"required\": false, \"showLabel\": false, \"createTime\": \"2023-03-26 17:32:20\", \"formItemId\": \"image-1679823137768\", \"updateTime\": \"2023-03-26 17:33:31\", \"displayType\": true}], \"userFormTheme\": {\"id\": 1, \"formKey\": \"da673c4576b74846b13d720c81445ea7\", \"logoImg\": \"\", \"showTitle\": true, \"createTime\": \"2023-03-26 17:36:11\", \"headImgUrl\": \"\", \"showNumber\": false, \"updateTime\": \"2023-03-26 17:36:16\", \"logoPosition\": \"left\", \"showDescribe\": true, \"backgroundImg\": \"\", \"submitBtnText\": \"提交\", \"backgroundColor\": \"\"}}', 0, '2023-03-26 18:09:19', '2023-03-26 18:09:19');
COMMIT;

-- ----------------------------
-- Table structure for fm_form_template_category
-- ----------------------------
DROP TABLE IF EXISTS `fm_form_template_category`;
CREATE TABLE `fm_form_template_category` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL COMMENT '分类名称',
  `sort` int(11) DEFAULT NULL COMMENT '排序',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='项目模板分类';

-- ----------------------------
-- Records of fm_form_template_category
-- ----------------------------
BEGIN;
INSERT INTO `fm_form_template_category` VALUES (1, '教育', 5, '2022-04-09 22:29:09', '2022-04-09 22:29:11');
INSERT INTO `fm_form_template_category` VALUES (2, '生活', 4, '2022-04-09 22:29:18', '2022-04-09 22:29:20');
INSERT INTO `fm_form_template_category` VALUES (3, '疫情', 3, '2022-04-09 22:29:27', '2022-04-09 22:29:27');
INSERT INTO `fm_form_template_category` VALUES (4, '商业', 2, '2022-04-09 22:29:37', '2022-04-09 22:29:37');
INSERT INTO `fm_form_template_category` VALUES (5, '其他', 5, '2022-04-09 22:29:48', '2022-04-09 22:29:48');
COMMIT;

-- ----------------------------
-- Table structure for fm_form_theme
-- ----------------------------
DROP TABLE IF EXISTS `fm_form_theme`;
CREATE TABLE `fm_form_theme` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL COMMENT '主题名称',
  `style` json NOT NULL COMMENT '主题风格\r\n',
  `head_img_url` varchar(255) CHARACTER SET utf8 NOT NULL COMMENT '头部图片',
  `color` json NOT NULL COMMENT '颜色代码',
  `btns_color` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '按钮颜色',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='项目主题外观模板';

-- ----------------------------
-- Records of fm_form_theme
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for fm_form_theme_category
-- ----------------------------
DROP TABLE IF EXISTS `fm_form_theme_category`;
CREATE TABLE `fm_form_theme_category` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL COMMENT '主题名称',
  `sort` int(11) DEFAULT NULL COMMENT '排序',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='表单主题分类';

-- ----------------------------
-- Records of fm_form_theme_category
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for fm_user_form
-- ----------------------------
DROP TABLE IF EXISTS `fm_user_form`;
CREATE TABLE `fm_user_form` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `key` varchar(50) NOT NULL COMMENT '表单唯一标识',
  `source_id` varchar(255) DEFAULT NULL COMMENT '来源Id',
  `source_type` tinyint(4) DEFAULT NULL COMMENT '来源类型',
  `name` varchar(100) NOT NULL COMMENT '表单名称',
  `description` text CHARACTER SET utf8mb4 COMMENT '表单描述',
  `user_id` bigint(20) NOT NULL COMMENT '用户ID',
  `type` tinyint(4) DEFAULT NULL COMMENT '表单类型',
  `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态',
  `is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `code` (`key`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4952 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户表单';

-- ----------------------------
-- Records of fm_user_form
-- ----------------------------
BEGIN;
INSERT INTO `fm_user_form` VALUES (4933, '56f39f226b744d3b89bd12e3f07c208b', NULL, 1, '问卷名称', '<p>为了给您提供更好的服务，希望您能抽出几分钟时间，将您的感受和建议告诉我们，我们非常重视每位 用户的宝贵意见，期待您的参与！现在我们就马上开始吧！</p>', 201, NULL, 2, 0, '2022-04-09 22:32:19', '2022-03-10 14:44:57');
INSERT INTO `fm_user_form` VALUES (4941, '77620e15d7d040e2a13dfb879e182b0e', NULL, 1, '问卷名称', '<p>为了给您提供更好的服务，希望您能抽出几分钟时间，将您的感受和建议告诉我们，我们非常重视每位 用户的宝贵意见，期待您的参与！现在我们就马上开始吧！</p>', 201, NULL, 1, 0, '2022-04-09 22:32:21', '2022-04-09 22:32:20');
INSERT INTO `fm_user_form` VALUES (4942, '6310dcf86b0b4c5b819ee546a6bc422d', NULL, 1, '问卷名称', '<p>为了给您提供更好的服务，希望您能抽出几分钟时间，将您的感受和建议告诉我们，我们非常重视每位 用户的宝贵意见，期待您的参与！现在我们就马上开始吧！</p>', 201, NULL, 1, 0, '2022-04-09 22:32:22', '2022-04-09 22:32:21');
INSERT INTO `fm_user_form` VALUES (4943, 'bfbe72d6cfa742c3a304466be356e5c8', NULL, 1, '问卷名称', '<p>为了给您提供更好的服务，希望您能抽出几分钟时间，将您的感受和建议告诉我们，我们非常重视每位 用户的宝贵意见，期待您的参与！现在我们就马上开始吧！</p>', 201, NULL, 1, 0, '2022-04-09 22:32:24', '2022-04-09 22:32:23');
INSERT INTO `fm_user_form` VALUES (4944, '55534086f9d249c6a3bdee7b9e95754e', NULL, 1, '问卷名称', '<p>为了给您提供更好的服务，希望您能抽出几分钟时间，将您的感受和建议告诉我们，我们非常重视每位 用户的宝贵意见，期待您的参与！现在我们就马上开始吧！</p>', 201, NULL, 1, 0, '2022-04-09 22:32:24', '2022-04-09 22:32:24');
INSERT INTO `fm_user_form` VALUES (4945, '0613b7afea7d484cbeab4de43d9077b5', NULL, 1, '问卷名称', '<p>为了给您提供更好的服务，希望您能抽出几分钟时间，将您的感受和建议告诉我们，我们非常重视每位 用户的宝贵意见，期待您的参与！现在我们就马上开始吧！</p>', 201, NULL, 1, 0, '2022-04-09 22:32:25', '2022-04-09 22:32:25');
INSERT INTO `fm_user_form` VALUES (4946, '83737919cc10449cbf5c2bc2c3d7133e', NULL, 1, '问卷名称', '<p>为了给您提供更好的服务，希望您能抽出几分钟时间，将您的感受和建议告诉我们，我们非常重视每位 用户的宝贵意见，期待您的参与！现在我们就马上开始吧！</p>', 201, NULL, 1, 0, '2022-04-09 22:32:26', '2022-04-09 22:32:26');
INSERT INTO `fm_user_form` VALUES (4947, 'eb188f21b64242d8b6db0b9915f25045', NULL, 1, '问卷名称', '<p>为了给您提供更好的服务，希望您能抽出几分钟时间，将您的感受和建议告诉我们，我们非常重视每位 用户的宝贵意见，期待您的参与！现在我们就马上开始吧！</p>', 201, NULL, 1, 0, '2022-04-09 22:32:27', '2022-04-09 22:32:27');
INSERT INTO `fm_user_form` VALUES (4948, 'fb7607396ab840918702bf1ed6efd954', NULL, 1, '问卷名称', '<p>为了给您提供更好的服务，希望您能抽出几分钟时间，将您的感受和建议告诉我们，我们非常重视每位 用户的宝贵意见，期待您的参与！现在我们就马上开始吧！</p>', 201, NULL, 1, 0, '2022-04-09 22:32:29', '2022-04-09 22:32:28');
INSERT INTO `fm_user_form` VALUES (4949, '17b1f15d880941459e116f1977cf72c5', NULL, 1, '问卷名称', '<p>为了给您提供更好的服务，希望您能抽出几分钟时间，将您的感受和建议告诉我们，我们非常重视每位 用户的宝贵意见，期待您的参与！现在我们就马上开始吧！</p>', 201, NULL, 1, 0, '2023-03-26 16:53:56', '2022-04-09 22:32:29');
INSERT INTO `fm_user_form` VALUES (4950, 'da673c4576b74846b13d720c81445ea7', NULL, 1, 'test', '<p>快来填写你的问卷描述吧</p>', 202, NULL, 1, 0, '2023-03-26 18:09:19', '2023-03-26 17:29:24');
INSERT INTO `fm_user_form` VALUES (4951, 'c63e316455324d2a9c1d4bfbf5c3fbc3', '1', 2, 'testtest', NULL, 202, NULL, 2, 0, '2023-03-26 18:09:50', '2023-03-26 18:09:28');
COMMIT;

-- ----------------------------
-- Table structure for fm_user_form_auth
-- ----------------------------
DROP TABLE IF EXISTS `fm_user_form_auth`;
CREATE TABLE `fm_user_form_auth` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `form_key` varchar(50) NOT NULL COMMENT '项目key',
  `auth_group_id` bigint(20) DEFAULT NULL COMMENT '授权组id',
  `user_id_list` json DEFAULT NULL COMMENT '用户Id列表',
  `role_id_list` json DEFAULT NULL COMMENT '角色Id列表',
  `dept_id_list` json DEFAULT NULL COMMENT '部门Id列表',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `project_key` (`form_key`,`auth_group_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='表单授权对象';

-- ----------------------------
-- Records of fm_user_form_auth
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for fm_user_form_data
-- ----------------------------
DROP TABLE IF EXISTS `fm_user_form_data`;
CREATE TABLE `fm_user_form_data` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `form_key` varchar(100) NOT NULL COMMENT '表单key',
  `serial_number` int(11) DEFAULT NULL COMMENT '序号',
  `original_data` json DEFAULT NULL COMMENT '填写结果',
  `submit_ua` json DEFAULT NULL COMMENT '提交ua',
  `submit_os` varchar(50) DEFAULT NULL COMMENT '提交系统',
  `submit_browser` varchar(50) DEFAULT NULL COMMENT '提交浏览器',
  `submit_request_ip` varchar(50) DEFAULT NULL COMMENT '请求ip',
  `submit_address` varchar(50) DEFAULT NULL COMMENT '提交地址',
  `complete_time` int(11) DEFAULT NULL COMMENT '完成时间 毫秒',
  `wx_open_id` varchar(100) DEFAULT NULL COMMENT '微信openId',
  `wx_user_info` json DEFAULT NULL COMMENT '微信用户信息',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `create_by` varchar(255) DEFAULT NULL COMMENT '创建人',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `update_by` varchar(255) DEFAULT NULL COMMENT '更新人',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `project_key` (`form_key`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='表单收集数据结果';
alter table fm_user_form_data ADD `file_url` varchar(255) DEFAULT '' comment '文件URL';
-- ----------------------------
-- Records of fm_user_form_data
-- ----------------------------
BEGIN;
INSERT INTO `fm_user_form_data` VALUES (1, 'c63e316455324d2a9c1d4bfbf5c3fbc3', 1, '{\"input-1679823045120\": \"hello test\", \"input-1679823126170\": \"13205926408\", \"image_upload-1679823074452\": [{\"uid\": 1679825433899, \"url\": \"http://localhost:8999/profile//75fc06034c0ada0281cf26e9cecc8a24/bf994398ad504bb6bb99608d9bfcd004.png\", \"name\": \"testtest.png\", \"status\": \"success\"}]}', '{\"os\": {\"name\": \"Mac OS\", \"version\": \"10.15.7\"}, \"ua\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36\", \"cpu\": {}, \"device\": {\"model\": \"Macintosh\", \"vendor\": \"Apple\"}, \"engine\": {\"name\": \"Blink\", \"version\": \"111.0.0.0\"}, \"browser\": {\"name\": \"Chrome\", \"major\": \"111\", \"version\": \"111.0.0.0\"}}', 'Mac OS', 'Chrome', '127.0.0.1', '内网IP', 26798, NULL, '{}', '2023-03-26 18:10:39', NULL, '2023-03-26 18:10:39', NULL);
COMMIT;

-- ----------------------------
-- Table structure for fm_user_form_item
-- ----------------------------
DROP TABLE IF EXISTS `fm_user_form_item`;
CREATE TABLE `fm_user_form_item` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `form_key` varchar(100) NOT NULL COMMENT '项目key',
  `form_item_id` varchar(50) NOT NULL COMMENT '表单项Id',
  `type` varchar(25) NOT NULL COMMENT '表单项类型 ',
  `label` varchar(255) NOT NULL COMMENT '表单项标题',
  `is_display_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '展示类型组件',
  `show_label` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否显示标签',
  `default_value` varchar(1000) DEFAULT NULL COMMENT '表单项默认值',
  `required` tinyint(1) NOT NULL COMMENT '是否必填',
  `placeholder` varchar(255) DEFAULT NULL COMMENT '输入型提示文字',
  `sort` bigint(20) DEFAULT '0' COMMENT '排序',
  `span` int(11) NOT NULL DEFAULT '24' COMMENT '栅格宽度',
  `scheme` json DEFAULT NULL COMMENT '表表单原始JSON',
  `reg_list` json DEFAULT NULL COMMENT '正则表达式 ',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `project_key` (`form_key`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=37782 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='表单项';

-- ----------------------------
-- Records of fm_user_form_item
-- ----------------------------
BEGIN;
INSERT INTO `fm_user_form_item` VALUES (37769, '56f39f226b744d3b89bd12e3f07c208b', 'input-1646894753370', 'INPUT', '单行文本', 0, 1, NULL, 1, '请输入单行文本', 1, 24, '{\"style\": {\"width\": \"100%\"}, \"config\": {\"tag\": \"t-input\", \"span\": 24, \"label\": \"单行文本\", \"append\": \"\", \"formId\": \"input-1646894753370\", \"prepend\": \"\", \"regList\": [], \"tagIcon\": \"input\", \"dataType\": {\"type\": \"\", \"message\": \"\"}, \"required\": true, \"changeTag\": true, \"renderKey\": \"input-16468947533701646894753370\", \"showLabel\": true}, \"typeId\": \"INPUT\", \"vModel\": \"input-1646894753370\", \"disabled\": false, \"readonly\": false, \"clearable\": true, \"placeholder\": \"请输入单行文本\", \"prefix-icon\": \"\", \"suffix-icon\": \"\", \"show-word-limit\": false}', '[]', '2022-03-10 14:45:54', '2022-03-10 14:45:54');
INSERT INTO `fm_user_form_item` VALUES (37770, '56f39f226b744d3b89bd12e3f07c208b', 'input-1646894754486', 'INPUT', '单行文本', 0, 1, NULL, 1, '请输入单行文本', 65537, 24, '{\"style\": {\"width\": \"100%\"}, \"config\": {\"tag\": \"t-input\", \"span\": 24, \"label\": \"单行文本\", \"append\": \"\", \"formId\": \"input-1646894754486\", \"prepend\": \"\", \"regList\": [], \"tagIcon\": \"input\", \"dataType\": {\"type\": \"\", \"message\": \"\"}, \"required\": true, \"changeTag\": true, \"renderKey\": \"input-16468947544861646894754486\", \"showLabel\": true}, \"typeId\": \"INPUT\", \"vModel\": \"input-1646894754486\", \"disabled\": false, \"readonly\": false, \"clearable\": true, \"placeholder\": \"请输入单行文本\", \"prefix-icon\": \"\", \"suffix-icon\": \"\", \"show-word-limit\": false}', '[]', '2022-03-10 14:45:55', '2022-03-10 14:45:55');
INSERT INTO `fm_user_form_item` VALUES (37771, '2c4f8a4089564485995e1f9201cf51aa', 'input-1649514512631', 'INPUT', '单行文本', 0, 1, NULL, 1, '请输入单行文本', 1, 24, '{\"sort\": 1, \"style\": {\"width\": \"100%\"}, \"config\": {\"tag\": \"t-input\", \"span\": 24, \"label\": \"单行文本\", \"append\": \"\", \"formId\": \"input-1649514512631\", \"prepend\": \"\", \"regList\": [], \"tagIcon\": \"input\", \"dataType\": {\"type\": \"identity\", \"message\": \"请输入正确的身份证号\"}, \"required\": true, \"changeTag\": true, \"renderKey\": \"input-16495145126311649514512631\", \"showLabel\": true}, \"typeId\": \"INPUT\", \"vModel\": \"input-1649514512631\", \"disabled\": false, \"readonly\": false, \"clearable\": true, \"placeholder\": \"请输入单行文本\", \"prefix-icon\": \"\", \"suffix-icon\": \"\", \"show-word-limit\": false}', '[]', '2022-04-09 22:28:36', '2022-04-09 22:28:33');
INSERT INTO `fm_user_form_item` VALUES (37772, 'da673c4576b74846b13d720c81445ea7', 'input-1679823045120', 'INPUT', '姓名', 0, 1, NULL, 1, '请输入姓名', 1, 24, '{\"sort\": 1, \"style\": {\"width\": \"100%\"}, \"config\": {\"tag\": \"t-input\", \"span\": 24, \"label\": \"姓名\", \"append\": \"\", \"formId\": \"input-1679823045120\", \"prepend\": \"\", \"regList\": [], \"tagIcon\": \"input\", \"dataType\": {\"type\": \"\", \"message\": \"\"}, \"required\": true, \"changeTag\": true, \"renderKey\": 1679823058005, \"showLabel\": true}, \"typeId\": \"INPUT\", \"vModel\": \"input-1679823045120\", \"disabled\": false, \"readonly\": false, \"clearable\": true, \"placeholder\": \"请输入姓名\", \"prefix-icon\": \"\", \"suffix-icon\": \"\", \"show-word-limit\": false}', '[]', '2023-03-26 17:30:58', '2023-03-26 17:30:46');
INSERT INTO `fm_user_form_item` VALUES (37774, 'da673c4576b74846b13d720c81445ea7', 'image_upload-1679823074452', 'IMAGE_UPLOAD', '图片上传', 0, 1, '[]', 1, NULL, 131073, 24, '{\"name\": \"file\", \"limit\": 2, \"accept\": \"image/*\", \"action\": \"/tduck-api/form/file/upload/da673c4576b74846b13d720c81445ea7\", \"config\": {\"tag\": \"t-image-upload\", \"span\": 24, \"label\": \"图片上传\", \"formId\": \"image_upload-1679823074452\", \"regList\": [], \"showTip\": false, \"tagIcon\": \"image-upload\", \"fileSize\": 10, \"required\": true, \"sizeUnit\": \"MB\", \"changeTag\": true, \"renderKey\": \"image_upload-16798230744521679823074452\", \"showLabel\": true, \"buttonText\": \"点击上传\", \"showRegList\": false, \"defaultValue\": []}, \"typeId\": \"IMAGE_UPLOAD\", \"vModel\": \"image_upload-1679823074452\", \"disabled\": false, \"multiple\": false, \"auto-upload\": true}', '[]', '2023-03-26 17:31:15', '2023-03-26 17:31:15');
INSERT INTO `fm_user_form_item` VALUES (37776, 'da673c4576b74846b13d720c81445ea7', 'input-1679823126170', 'INPUT', '手机号', 0, 1, NULL, 1, '请输入手机号', 65537, 24, '{\"dId\": 37776, \"key\": \"input-1679823126170167982331457037776\", \"sort\": 65537, \"style\": {\"width\": \"100%\"}, \"config\": {\"tag\": \"t-input\", \"span\": 24, \"label\": \"手机号\", \"append\": \"\", \"formId\": \"input-1679823126170\", \"prepend\": \"\", \"regList\": [], \"tagIcon\": \"input\", \"dataType\": {\"type\": \"phone\", \"message\": \"请输入正确的手机号\"}, \"required\": true, \"changeTag\": true, \"renderKey\": 1679823324638, \"showLabel\": true}, \"typeId\": \"INPUT\", \"vModel\": \"input-1679823126170\", \"regList\": [], \"disabled\": false, \"readonly\": false, \"clearable\": true, \"formItemId\": \"input-1679823126170\", \"displayType\": false, \"placeholder\": \"请输入手机号\", \"prefix-icon\": \"\", \"suffix-icon\": \"\", \"show-word-limit\": false}', '[]', '2023-03-26 17:35:25', '2023-03-26 17:32:13');
INSERT INTO `fm_user_form_item` VALUES (37777, 'da673c4576b74846b13d720c81445ea7', 'image-1679823137768', 'IMAGE', '图片展示', 1, 0, NULL, 0, NULL, 196609, 24, '{\"alt\": \"\", \"fit\": \"contain\", \"src\": \"http://localhost:8999/profile//854d6fae5ee42911677c739ee1734486/e16c5fdc1756452892bccaf84ab490ef.png\", \"sort\": 196609, \"style\": {\"width\": \"100%\"}, \"config\": {\"tag\": \"el-image\", \"span\": 24, \"error\": \"image\", \"label\": \"图片展示\", \"formId\": \"image-1679823137768\", \"regList\": [], \"tagIcon\": \"image\", \"required\": false, \"changeTag\": true, \"renderKey\": \"image-16798231377681679823137768\", \"showLabel\": false, \"displayType\": true, \"showRegList\": false, \"showRequired\": false, \"showClearable\": false, \"showDefaultValue\": false}, \"typeId\": \"IMAGE\", \"vModel\": \"image-1679823137768\"}', '[]', '2023-03-26 17:33:31', '2023-03-26 17:32:20');
INSERT INTO `fm_user_form_item` VALUES (37778, 'c63e316455324d2a9c1d4bfbf5c3fbc3', 'input-1679823045120', 'INPUT', '姓名', 0, 1, NULL, 1, '请输入姓名', 1, 24, '{\"sort\": 1, \"style\": {\"width\": \"100%\"}, \"config\": {\"tag\": \"t-input\", \"span\": 24, \"label\": \"姓名\", \"append\": \"\", \"formId\": \"input-1679823045120\", \"prepend\": \"\", \"regList\": [], \"tagIcon\": \"input\", \"dataType\": {\"type\": \"\", \"message\": \"\"}, \"required\": true, \"changeTag\": true, \"renderKey\": 1679823058005, \"showLabel\": true}, \"typeId\": \"INPUT\", \"vModel\": \"input-1679823045120\", \"disabled\": false, \"readonly\": false, \"clearable\": true, \"placeholder\": \"请输入姓名\", \"prefix-icon\": \"\", \"suffix-icon\": \"\", \"show-word-limit\": false}', '[]', '2023-03-26 18:09:28', '2023-03-26 18:09:28');
INSERT INTO `fm_user_form_item` VALUES (37779, 'c63e316455324d2a9c1d4bfbf5c3fbc3', 'input-1679823126170', 'INPUT', '手机号', 0, 1, NULL, 1, '请输入手机号', 65537, 24, '{\"dId\": 37776, \"key\": \"input-1679823126170167982331457037776\", \"sort\": 65537, \"style\": {\"width\": \"100%\"}, \"config\": {\"tag\": \"t-input\", \"span\": 24, \"label\": \"手机号\", \"append\": \"\", \"formId\": \"input-1679823126170\", \"prepend\": \"\", \"regList\": [], \"tagIcon\": \"input\", \"dataType\": {\"type\": \"phone\", \"message\": \"请输入正确的手机号\"}, \"required\": true, \"changeTag\": true, \"renderKey\": 1679823324638, \"showLabel\": true}, \"typeId\": \"INPUT\", \"vModel\": \"input-1679823126170\", \"regList\": [], \"disabled\": false, \"readonly\": false, \"clearable\": true, \"formItemId\": \"input-1679823126170\", \"displayType\": false, \"placeholder\": \"请输入手机号\", \"prefix-icon\": \"\", \"suffix-icon\": \"\", \"show-word-limit\": false}', '[]', '2023-03-26 18:09:28', '2023-03-26 18:09:28');
INSERT INTO `fm_user_form_item` VALUES (37780, 'c63e316455324d2a9c1d4bfbf5c3fbc3', 'image_upload-1679823074452', 'IMAGE_UPLOAD', '图片上传', 0, 1, '[]', 1, '此题为必填项目', 131073, 24, '{\"dId\": 37780, \"key\": \"image_upload-1679823074452167982545167837780\", \"name\": \"file\", \"sort\": 131073, \"limit\": 1, \"accept\": \"image/*\", \"action\": \"http://localhost:8999/form/file/upload/c63e316455324d2a9c1d4bfbf5c3fbc3\", \"config\": {\"tag\": \"t-image-upload\", \"span\": 24, \"label\": \"图片上传\", \"formId\": \"image_upload-1679823074452\", \"regList\": [], \"showTip\": false, \"tagIcon\": \"image-upload\", \"fileSize\": 10, \"required\": true, \"sizeUnit\": \"MB\", \"changeTag\": true, \"renderKey\": \"image_upload-16798230744521679823074452\", \"showLabel\": true, \"buttonText\": \"点击上传\", \"showRegList\": false, \"defaultValue\": []}, \"typeId\": \"IMAGE_UPLOAD\", \"vModel\": \"image_upload-1679823074452\", \"regList\": [], \"disabled\": false, \"multiple\": false, \"formItemId\": \"image_upload-1679823074452\", \"auto-upload\": true, \"displayType\": false, \"placeholder\": \"此题为必填项目\"}', '[]', '2023-03-26 18:11:01', '2023-03-26 18:09:28');
INSERT INTO `fm_user_form_item` VALUES (37781, 'c63e316455324d2a9c1d4bfbf5c3fbc3', 'image-1679823137768', 'IMAGE', '图片展示', 1, 0, NULL, 0, NULL, 196609, 24, '{\"alt\": \"\", \"fit\": \"contain\", \"src\": \"http://localhost:8999/profile//854d6fae5ee42911677c739ee1734486/e16c5fdc1756452892bccaf84ab490ef.png\", \"sort\": 196609, \"style\": {\"width\": \"100%\"}, \"config\": {\"tag\": \"el-image\", \"span\": 24, \"error\": \"image\", \"label\": \"图片展示\", \"formId\": \"image-1679823137768\", \"regList\": [], \"tagIcon\": \"image\", \"required\": false, \"changeTag\": true, \"renderKey\": \"image-16798231377681679823137768\", \"showLabel\": false, \"displayType\": true, \"showRegList\": false, \"showRequired\": false, \"showClearable\": false, \"showDefaultValue\": false}, \"typeId\": \"IMAGE\", \"vModel\": \"image-1679823137768\"}', '[]', '2023-03-26 18:09:28', '2023-03-26 18:09:28');
COMMIT;

-- ----------------------------
-- Table structure for fm_user_form_logic
-- ----------------------------
DROP TABLE IF EXISTS `fm_user_form_logic`;
CREATE TABLE `fm_user_form_logic` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '逻辑Id',
  `form_key` varchar(100) NOT NULL COMMENT '表单key',
  `scheme` json DEFAULT NULL COMMENT '逻辑定义',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `project_key` (`form_key`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='项目逻辑';

-- ----------------------------
-- Records of fm_user_form_logic
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for fm_user_form_notify_setting
-- ----------------------------
DROP TABLE IF EXISTS `fm_user_form_notify_setting`;
CREATE TABLE `fm_user_form_notify_setting` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `form_key` varchar(100) NOT NULL COMMENT '表单key',
  `is_email_notify` tinyint(1) DEFAULT NULL COMMENT '开启邮件通知',
  `new_write_notify_email` varchar(255) DEFAULT NULL COMMENT '新反馈通知邮件列表',
  `is_wx_notify` tinyint(1) DEFAULT NULL COMMENT '开启邮件通知',
  `new_write_notify_wx` varchar(255) DEFAULT NULL COMMENT '新反馈通知微信列表',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `project_key` (`form_key`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='表单通知设置';

-- ----------------------------
-- Records of fm_user_form_notify_setting
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for fm_user_form_perms_group
-- ----------------------------
DROP TABLE IF EXISTS `fm_user_form_perms_group`;
CREATE TABLE `fm_user_form_perms_group` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `form_key` varchar(50) DEFAULT NULL COMMENT '表单key',
  `name` varchar(100) NOT NULL COMMENT '权限组名称',
  `description` varchar(255) CHARACTER SET utf8mb4 NOT NULL COMMENT '权限组描述',
  `btn_perms` json NOT NULL COMMENT '按钮权限',
  `field_visible_perms` json NOT NULL COMMENT '数据可见权限',
  `field_edit_perms` json NOT NULL COMMENT '数据编辑权限',
  `data_perms` json NOT NULL COMMENT '数据权限',
  `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态',
  `is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='表单权限组';

-- ----------------------------
-- Records of fm_user_form_perms_group
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for fm_user_form_share_setting
-- ----------------------------
DROP TABLE IF EXISTS `fm_user_form_share_setting`;
CREATE TABLE `fm_user_form_share_setting` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `form_key` varchar(100) NOT NULL COMMENT '表单key',
  `is_share_img` tinyint(1) DEFAULT NULL COMMENT '是否设置分享图片',
  `share_img_url` varchar(255) DEFAULT NULL COMMENT '分享图片',
  `is_share_title` tinyint(1) DEFAULT NULL COMMENT '是否开启设置标题',
  `share_title_content` varchar(255) DEFAULT NULL COMMENT '分享标题',
  `is_share_desc` tinyint(1) DEFAULT NULL COMMENT '是否设置分享描述',
  `share_desc_content` varchar(255) DEFAULT NULL COMMENT '分享描述',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `project_key` (`form_key`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='表单分享设置';

-- ----------------------------
-- Records of fm_user_form_share_setting
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for fm_user_form_submit_setting
-- ----------------------------
DROP TABLE IF EXISTS `fm_user_form_submit_setting`;
CREATE TABLE `fm_user_form_submit_setting` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `form_key` varchar(100) NOT NULL COMMENT '表单key',
  `is_prompt_img` tinyint(1) DEFAULT NULL COMMENT '是否显示提示图片',
  `prompt_img_url` varchar(200) DEFAULT NULL COMMENT '提示图片地址',
  `is_prompt_text` tinyint(1) DEFAULT NULL COMMENT '是否显示提示文字',
  `prompt_text_content` varchar(255) DEFAULT NULL COMMENT '提交提示文字内容',
  `is_submit_jump` tinyint(1) DEFAULT NULL COMMENT '是否提交跳转',
  `submit_jump_url` varchar(255) DEFAULT NULL COMMENT '提交跳转连接',
  `is_public_result` tinyint(1) DEFAULT NULL COMMENT '公开提交结果',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `project_key` (`form_key`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户表单提交设置';

-- ----------------------------
-- Records of fm_user_form_submit_setting
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for fm_user_form_theme
-- ----------------------------
DROP TABLE IF EXISTS `fm_user_form_theme`;
CREATE TABLE `fm_user_form_theme` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `form_key` varchar(100) NOT NULL COMMENT '表单key',
  `submit_btn_text` varchar(20) DEFAULT NULL COMMENT '提交按钮文字',
  `logo_img` varchar(255) DEFAULT NULL COMMENT 'logo图片',
  `logo_position` varchar(10) DEFAULT NULL COMMENT 'logo位置',
  `background_color` varchar(200) DEFAULT NULL COMMENT '背景颜色',
  `background_img` varchar(200) DEFAULT NULL COMMENT '背景图片',
  `show_title` tinyint(1) DEFAULT '1' COMMENT '是否显示标题',
  `show_describe` tinyint(1) DEFAULT '1' COMMENT '是否显示描述语',
  `btns_color` varchar(50) DEFAULT NULL COMMENT '按钮颜色',
  `show_number` varchar(255) DEFAULT '0' COMMENT '显示序号',
  `head_img_url` varchar(255) DEFAULT NULL COMMENT '头部图片',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `project_key` (`form_key`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='项目表单项';

-- ----------------------------
-- Records of fm_user_form_theme
-- ----------------------------
BEGIN;
INSERT INTO `fm_user_form_theme` VALUES (1, 'da673c4576b74846b13d720c81445ea7', '提交', '', 'left', '', '', 1, 1, NULL, '0', '', '2023-03-26 17:36:16', '2023-03-26 17:36:11');
INSERT INTO `fm_user_form_theme` VALUES (2, 'c63e316455324d2a9c1d4bfbf5c3fbc3', '提交', '', 'left', '', '', 1, 1, NULL, '0', '', '2023-03-26 18:09:28', '2023-03-26 18:09:28');
COMMIT;

-- ----------------------------
-- Table structure for fm_user_form_write_setting
-- ----------------------------
DROP TABLE IF EXISTS `fm_user_form_write_setting`;
CREATE TABLE `fm_user_form_write_setting` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `form_key` varchar(100) NOT NULL COMMENT '表单key',
  `is_wx_write` tinyint(1) DEFAULT NULL COMMENT '只在微信填写',
  `is_wx_write_once` tinyint(1) DEFAULT NULL COMMENT '一个微信只能填写一次',
  `is_everyone_write_once` tinyint(1) DEFAULT NULL COMMENT '每人只能填写一次',
  `is_everyone_day_write_once` tinyint(1) DEFAULT NULL COMMENT '每人每天只能填写一次',
  `write_once_prompt_text` varchar(255) DEFAULT NULL COMMENT '填写之后提示',
  `is_record_wx_user` tinyint(1) DEFAULT NULL COMMENT '记录微信用户个人信息',
  `is_timed_collection` tinyint(1) DEFAULT NULL COMMENT '是否定时收集',
  `is_timed_quantitative_collection` tinyint(1) DEFAULT NULL COMMENT '是否定时定量收集',
  `timed_collection_begin_time` datetime DEFAULT NULL COMMENT '定时收集开始时间',
  `timed_collection_end_time` datetime DEFAULT NULL COMMENT '定时收集结束时间',
  `timed_not_enabled_prompt_text` varchar(100) DEFAULT NULL COMMENT '定时未启动提示文字',
  `timed_deactivate_prompt_text` varchar(100) DEFAULT NULL COMMENT '定时停用会提示文字',
  `timed_quantitative_quantity` int(11) DEFAULT NULL COMMENT '定时定量数量',
  `timed_end_prompt_text` varchar(100) DEFAULT NULL COMMENT '定时定量完成提示',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `project_key` (`form_key`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='表单填写设置';

-- ----------------------------
-- Records of fm_user_form_write_setting
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for wx_mp_user
-- ----------------------------
DROP TABLE IF EXISTS `wx_mp_user`;
CREATE TABLE `wx_mp_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `appid` varchar(255) NOT NULL COMMENT '公众号AppId',
  `nickname` varchar(255) DEFAULT NULL COMMENT '昵称',
  `sex` tinyint(1) DEFAULT NULL COMMENT '性别',
  `head_img_url` varchar(255) NOT NULL COMMENT '头像',
  `union_id` varchar(150) DEFAULT NULL,
  `open_id` varchar(150) NOT NULL,
  `country` varchar(255) DEFAULT NULL COMMENT '国家',
  `province` varchar(255) DEFAULT NULL COMMENT '省',
  `city` varchar(255) DEFAULT NULL COMMENT '城市',
  `is_subscribe` tinyint(1) DEFAULT '1' COMMENT '是否关注',
  `user_id` bigint(20) DEFAULT NULL COMMENT '用户Id',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `wx_union_id` (`head_img_url`(191)) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='微信公众号用户 ';

-- ----------------------------
-- Records of wx_mp_user
-- ----------------------------
BEGIN;
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
